<{include file="admin/header.html"}>
<link href="<{$smarty.const.STATIC_COMPONENT_URL}>css/jquery-ui.css" type="text/css" rel="stylesheet" />
<script src="<{$smarty.const.STATIC_COMPONENT_URL}>js/jquery-1.7.1.js"></script>
<script src="<{$smarty.const.STATIC_COMPONENT_URL}>js/jquery.ui.core.js"></script>
<script src="<{$smarty.const.STATIC_COMPONENT_URL}>js/jquery.ui.widget.js"></script>
<script src="<{$smarty.const.STATIC_COMPONENT_URL}>js/jquery.ui.datepicker.js"></script>
<script type="text/javascript">
$(function() {
	$( "#datepicker" ).datepicker();
});
function filterp(){
	url = '<{$smarty.const.APPLICATION_URL}>/admin/customer';
	if (document.filter.date_create.value != '')
		url += '/date_create/' + URLEncode(document.filter.date_create.value);
	window.location = url;
}
</script>
<div class="tabs">
    <div class="panel-header-select">
		<label><{#_LB_GARAGEHOLDER#}></label>
	</div>
</div>
<div class="buttons_action" align="right">
	<button type="button" onClick="filterp()">
	    <img alt="" src="<{$smarty.const.STATIC_COMPONENT_URL}>images/search_16.png"/>
	    <{#_LB_SEARCH#}>
	</button>	
	<form name="filter" method="post" action="">
		<table>
			<tr>
				<td><{#_LB_DATE#}>: </td>
				<td><input name="date_create" type="text" id="datepicker" /></td>
				<td width="20"></td>
			</tr>
		</table>
	</form>
</div>
<br/>
<table class="grid">				
	<tr class="head">
        <td width="10%"><{#_LB_CUSTOMER_ID#}></td>	
		<td width="20%"><{#_LB_CUSTOMER_USERNAME#}></td>	
		<td width="20%"><{#_LB_CUSTOMER_FIRSTNAME#}></td>
		<td width="20%"><{#_LB_CUSTOMER_LASTNAME#}></td>
		<td width="20%"><{#_LB_CUSTOMER_EMAIL#}></td>
		<td width="20%"><{#_LB_CUSTOMER_SEX#}></td>
		<td width="20%"><{#_LB_CUSTOMER_TELEPHONE#}></td>
		<td width="20%"><{#_LB_CUSTOMER_MOBILEPHONE#}></td>
		<td width="20%"><{#_LB_CUSTOMER_DATECREATE#}></td>
		<td width="10%"><{#_LB_FUNCTION#}></td>				
	</tr>
	<{while $customer->fetch()}>
		<tr>
            <td><{$customer->id}></td>
			<td><{$customer->username}></td>
			<td><{$customer->firstname}></td>
			<td><{$customer->lastname}></td>
			<td><{$customer->email}></td>
			<td><{ if $customer->sex == 1}>Male<{else}>Female<{/if}></td>
			<td><{$customer->telephone}></td>
			<td><{$customer->mobilephone}></td>
			<td><{$customer->date_create|date_format:#_DATE_FORMAT_INPUT#}></td>
			<td>
				<a href="<{$smarty.const.APPLICATION_URL}>/admin/customer/action/view/id/<{$customer->id}>" title="edit" >
					<img border=0 alt="edit_small.png" src="<{$smarty.const.STATIC_COMPONENT_URL}>images/view-detail-icon.png"/>						
				</a>		
				
				<a onclick="return confirm('<{#_LB_DELETE_CONFIRM#}>')" href="<{$smarty.const.APPLICATION_URL}>/admin/customer/action/delete/id/<{$customer->id}>" title="delete" >
					<img border=0 alt="delete_small.png" src="<{$smarty.const.STATIC_COMPONENT_URL}>images/delete_small.png"/>						
				</a>		
			</td>
		</tr>
	<{/while}>	
</table>	

<div align="right">
	<{include file='pager.html' data=$customer->getPaginationData() url_base=$url_base}>
</div>


<{include file="admin/footer.html"}>